Configure Autoscaling of an App with the API
Using this API you can configure autoscaling of a deployed app and send those updates to the cloud for TIBCO Flogo®.
To configure autoscaling of a deployed app you need the App ID — ID of the app to be accessed, which can be retrieved using the GET /v1/dp/apps method.
- Procedure
Use the PUT /v1/dp/apps/{appId}/autoscaling method along with the following required request body parameters.
{
"hpaMetrics":{
"cpuUtilization": {
"averageCpuUtilization": 0,
"enabled": true
},
"memoryUtilization":
{"averageMemoryUtilization": 0,
"enabled": true
}
},
"maxReplicas": 0,
"minReplicas": 0
}Here,
averageCpuUtilizationandmemoryUtilizationare two conditions which we need to set for the auto scaling configuration. You can providemin/max replicasfor the HPA resource configuration.Note: HPA stands for Horizontal Pod Autoscaling. It is a feature which scales up or down the number of pods of an application based upon the load. The load is determined by two values;averageCpuUtilizationandmemoryUtilization. The HPA object will scale one more pod until themaxReplicascount is matched.Include one or more of the query parameters to filter the results. Click the API Documentation button on your Data Plane for more information.